

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>编辑产品销售单</title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><g:link class="list" action="list">产品销售单列表</g:link></span>
            <span class="menuButton"><g:link class="create" action="create">创建销售单</g:link></span>
        </div>
        <div class="body">
            <h1>编辑产品销售单</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${exportProductInstance}">
            <div class="errors">
                <g:renderErrors bean="${exportProductInstance}" as="list" />
            </div>
            </g:hasErrors>
            <g:form method="post" >
                <input type="hidden" name="id" value="${exportProductInstance?.id}" />
                <input type="hidden" name="version" value="${exportProductInstance?.version}" />
                <div class="dialog">
                    <table>
                        <tbody>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="productName">产品名称:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:exportProductInstance,field:'productName','errors')}">
                                    <input type="text" id="productName" name="productName" value="${fieldValue(bean:exportProductInstance,field:'productName')}"/>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="amount">销售数量:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:exportProductInstance,field:'amount','errors')}">
                                    <input type="text" id="amount" name="amount" value="${fieldValue(bean:exportProductInstance,field:'amount')}" />
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="catalog">产品分类:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:exportProductInstance,field:'catalog','errors')}">
                                    <g:select optionKey="id" from="${Catalog.list()}" name="catalog.id" value="${exportProductInstance?.catalog?.id}" ></g:select>
                                </td>
                            </tr>

                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="supplier">供应商:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:exportProductInstance,field:'supplier','errors')}">
                                    <g:select optionKey="id" from="${Supplier.list()}" name="supplier.id" value="${exportProductInstance?.supplier?.id}" ></g:select>
                                </td>
                            </tr>

                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="modelNo">产品型号:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:exportProductInstance,field:'modelNo','errors')}">
                                    <input type="text" id="modelNo" name="modelNo" value="${fieldValue(bean:exportProductInstance,field:'modelNo')}"/>
                                </td>
                            </tr>

                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="number">进货号:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:exportProductInstance,field:'number','errors')}">
                                    <input type="text" id="number" name="number" value="${fieldValue(bean:exportProductInstance,field:'number')}"/>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="inPrice">进货价:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:exportProductInstance,field:'inPrice','errors')}">
                                    <input type="text" id="inPrice" name="inPrice" value="${fieldValue(bean:exportProductInstance,field:'inPrice')}" />
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="outPrice">零售价:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:exportProductInstance,field:'outPrice','errors')}">
                                    <input type="text" id="outPrice" name="outPrice" value="${fieldValue(bean:exportProductInstance,field:'outPrice')}" />
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="productFlag">产品状态:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:exportProductInstance,field:'productFlag','errors')}">
                                    <input type="text" id="productFlag" name="productFlag" value="${fieldValue(bean:exportProductInstance,field:'productFlag')}"/>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="time">进货时间:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:exportProductInstance,field:'time','errors')}">
                                    <g:datePicker name="time" value="${exportProductInstance?.time}" ></g:datePicker>
                                </td>
                            </tr>

                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="sellTime">销售时间:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:exportProductInstance,field:'sellTime','errors')}">
                                    <g:datePicker name="sellTime" value="${exportProductInstance?.sellTime}" precision="day"></g:datePicker>
                                </td>
                            </tr>

                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="remarks">备注:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:exportProductInstance,field:'remarks','errors')}">
                                    <g:textArea name="remarks" value="${fieldValue(bean:exportProductInstance,field:'remarks')}"/>
                                </td>
                            </tr> 
                        
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><g:actionSubmit class="save" value="Update" /></span>
                    <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>
                </div>
            </g:form>
        </div>
    </body>
</html>
